package com.algorithm.thePrimaryAlgorithm;

import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;

@Slf4j
public class StringSulotionLC12 {
    public void reverseString(char[] s) {
        int left = 0;
        int right = s.length-1;
        while (left<right){
            char temp = s[left];
            s[left] = s[right] ;
            s[right] = temp;
            left++;
            right--;
        }
    }

    @Test
    public void test(){
        char [] a = {'h','e','l','l','o'};
        reverseString(a);
        log.info("over");
    }
}
